home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / Other Langs / MacPerl ƒ / Perl Source ƒ / MacPerl / MPEditions.h < prev    next >
Text File  |  1993-10-22  |  3KB  |  111 lines

  1. /*********************************************************************
  2. Project    :    MacPerl            -    Real Perl Application
  3. File        :    MPEditions.h    -
  4. Author    :    Matthias Neeracher
  5.  
  6. A lot of this code is borrowed from 7Edit written by
  7. Apple Developer Support UK
  8.  
  9. Started    :    17Mar93                                Language    :    MPW C
  10. Modified    :    17Mar93    MN
  11.                 29May93    MN    Compiles correctly
  12.                 16Sep93    MN    Runtime doesn't support Editions
  13. Last        :    16Sep93
  14. *********************************************************************/
  15.  
  16. #include <Types.h>
  17. #include <QuickDraw.h>
  18. #include <Files.h>
  19. #include <Packages.h>
  20. #include <GestaltEqu.h>
  21. #include <Editions.h>
  22. #include <Printing.h>
  23.  
  24. #ifndef __MPEDITIONS__
  25. #define __MPEDITIONS__
  26.  
  27. #ifndef RUNTIME
  28.  
  29. #include "MPGlobals.h"
  30. #include "MPUtils.h"
  31.  
  32. pascal void AddSection(SectHandle newSection, DPtr aDocument);
  33.  
  34. pascal void CreateSection(SectionHandle   EMSection,
  35.                                                   short           sectionID,
  36.                                                   short           theStart,
  37.                                                   short           theEnd,
  38.                                                   DPtr            aDocument,
  39.                                                   RgnHandle       theBorder);
  40.  
  41. pascal void DeleteASection(SectHandle sectToDelete, DPtr theDoc);
  42.  
  43. pascal void AssocAllSections(DPtr theDoc);
  44.  
  45. /*routines for writing out and reading in section resources*/
  46. /*rAliasType and rSectionType resources*/
  47.  
  48. pascal void ReadAllSectionResources(DPtr  aDoc);
  49.  
  50. pascal void ReadSectionRecords(DPtr  aDoc);
  51.  
  52. pascal void ReadASection(SectHandle  aSectHandle);
  53.  
  54. pascal void SaveASection(SectHandle aSection, short count);
  55.  
  56. pascal void SaveSections(DPtr aDocument);
  57.  
  58. /*routines for writing out editions*/
  59.  
  60. pascal void ReadAnEdition(SectionHandle mySectHdl);
  61.  
  62. pascal void WriteAllEditions(DPtr aDocument);
  63.  
  64. pascal void WriteAnEdition(SectionHandle mySectHdl);
  65.  
  66. /*routines for handling the section borders*/
  67.  
  68. pascal SectHandle GetSection(short theStartPos, short theEndPos, DPtr aDoc);
  69.  
  70. pascal void RecalcBorders(DPtr aDoc, Boolean invalidate);
  71.  
  72. pascal void SetSelectionRgn(TEHandle  theTEHandle,
  73.                             short     posStart,
  74.                                                         short     posEnd,
  75.                                                         RgnHandle    *theSelRgn);
  76.  
  77. pascal void ShowSectionBorders(DPtr aDoc);
  78.  
  79. pascal void DoTEPasteSectionRecalc(DPtr theDoc);
  80.  
  81. pascal void DoTEDeleteSectionRecalc(DPtr theDoc);
  82.  
  83. pascal void DoTECutSectionRecalc(DPtr theDoc);
  84.  
  85. pascal void DoTEKeySectionRecalc(DPtr theDoc, char theChar);
  86.  
  87. /*utility routines*/
  88.  
  89. pascal SectHandle GetERefCon(SectionHandle EMSection);
  90.  
  91. pascal void SetERefCon(SectionHandle  EMSection, SectHandle aSectHandle);
  92.  
  93. pascal void DeRegisterAllSections(DPtr aDoc);
  94.  
  95. pascal Handle GetHandleToText(TEHandle aTEHandle, short theStart, short theEnd);
  96.  
  97. /*now the routines for dealing with the user interface issues*/
  98.  
  99. pascal void DoSectionOptions(DPtr theDoc);
  100.  
  101. pascal void DoSubscribe(DPtr theDoc);
  102.  
  103. pascal OSErr GetEditionContainer(DPtr theDoc, FSSpec *theFSSpec);
  104.  
  105. pascal OSErr PublishText(DPtr theDoc, FSSpec *theFSSpec);
  106.  
  107. #endif
  108.  
  109. pascal Boolean KeyOKinSubscriber(char whatKey);
  110.  
  111. #endif